﻿using System;
using System.Data;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using HR.Appointments.Service;

/// <summary>
/// All employee pages should derive from this page
/// </summary>
public class EmployeePage : UserPage
{
    //TODO: Check if obsolete and then dervice from webpage instead
    public EmployeePage()
    {
    }

    /// <summary>
    /// Check credantials of secure login page.
    /// If login failed or login expired then method redirects to login page
    /// </summary>
    //NOTE: Could not put this in constructor because request was not initialied then.
    protected void CheckCredentials()
    {
        if (!IsLoggedIn)
        {
            Response.Redirect(LOGIN_REDIRECT_PAGE);
        }
    }
}
